﻿<!DOCTYPE html>

<!--考试监控-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .el-table {
            height: 390px !important;
        }

        .el-table__body-wrapper {
            height: 340px !important;
        }
    </style>
</head>

<body>
    
<div id="app" v-cloak>   

        <el-col span="24">
            <!--user建议替换为表名 需要与resource文件夹下js 中的对象保持一致  -->
            <el-form label-position=" right" ref="form" :inline="true" :model="formInline" class="demo-form-inline">
                <el-row>
                    <el-col class="head-tool">
                        
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />考生列表</strong></div>
                        <span>
                            <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3"
                                @click="onSubmit"></btn>
                            <btn-export-list url="/api/PX_ExamUser/ExportForKSXX" :forminline="this.formInline" linetype="4"></btn-export-list>
                        </span>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col span="8">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input v-model="formInline.model.mark01"
                                    :placeholder="Examinationmonitoring.CandidateName" size="mini">
                                    <template slot="prepend">
                                        {{Examinationmonitoring.CandidateName+mark.m}}
                                    </template>
                                </el-input>
                            </el-form-item>
                        </div>

                    </el-col>



                </el-row>

            </el-form>
            <el-col span="24">
                <!-- <h3 style="font-size:12px;font-weight:normal;margin-top:0;">考生列表</h3> -->

                <el-table ref="table" stripe :data="result" :row-key="getRowKeys"
                    :height="ListItem.tableHeight" border @selection-change="handleSelectionChange"
                    row-style="height:10px" style="width: 100%;height: 100%;">
                    <el-table-column type="selection" style="
       padding-top: 0px;
       padding-bottom: 0px;
   " align="center" width="55" :reserve-selection="true">
                    </el-table-column>

                    <!-- 除第一列以外 遍历所有字段 -->
                    <!--user建议替换为表名 需要与resource文件夹下js 中的对象保持一致  下同-->
                  
                    <el-table-column prop="mark01" :label="Examinationmonitoring.CandidateName">
                    </el-table-column>
                    <el-table-column prop="mark02" :label="Examinationmonitoring.Nameoftestpaper" width="600"
                        show-overflow-tooltip="true">
                    </el-table-column>
                    <el-table-column prop="examinationscore" :label="Examinationmonitoring.Examinationscore" width="80">
                    </el-table-column>
                    <el-table-column prop="isQualified" :label="Examinationmonitoring.Examinationstatus"
                        width="80">
                    </el-table-column>
                    <el-table-column prop="numberofexaminations" :label="Examinationmonitoring.Numberofexaminations"
                        width="80">
                    </el-table-column>
                    <el-table-column prop="whethertoremindleaders" :label="Examinationmonitoring.Whethertoremindleaders"
                        width="110">
                    </el-table-column>




                </el-table>
                <el-row type="flex" justify="end">
                    <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                        :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes"
                        :page-size="ListItem.pagesize" :layout="ListItem.layout" :total="ListItem.total">
                    </el-pagination>
                </el-row>
                <!--user建议替换为表名 需要与resource文件夹下js 中的对象保持一致  -->

                <el-dialog :title="ErrorRateStatisticsofExaminationQuestions.TableName"
                    :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%" top="0vh">
                    <iframe ref="iframe" :src="ListItem.InputUrl" style="height:280px;width:100%"
                        frameborder="0"></iframe>
                </el-dialog>

            </el-col>
            
        </el-col>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                id:'',
                Form: {},
                Form2: {},
                result: [],
                ListItem: ListItem,
                value1: '',
                Examinationmethods: [],
                checked: true,
                isShow: true,
                formInline: {
                    value1: '',
                    // 遍历所有列 均为字符串即可
                    model: {
                        Name: '', Category: '', Teacher: '', LlearningTime: '', Courseware: '', IsEncrypted: '',
                    },
                    offset: 0,
                    limit: 100
                },
                formInline2: {
                    value1: '',
                    // 遍历所有列 均为字符串即可
                    model: {
                        Name: '', Category: '', Teacher: '', LlearningTime: '', Courseware: '', IsEncrypted: '',
                    },
                    offset: 0,
                    limit: 100
                }
            },
            mounted: function () {

                //获取下拉菜单内容
                //this.Examinationmethods = getDicData('w64');
                this.id = getUrlParam("id");
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                closeDialog: function () { closeDialog(this); },
                //Model 替换成 表名
                onDelete: function () { onDelete(this, '/api/Examinationmonitoring/DeleteMuti'); },

                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Model 替换成 表名
                OpenInput: function (val, id) { DialogShow(this, val, "ExaminationmonitoringInput.html", id); },
                //Model 替换成 表名
                GetPageData: function (currentIndex) {
                    var mythis = this;
                    
                    if (this.id != '999') {
                        this.formInline.model.id = this.id
                        myAjax("post", mythis, '/api/PX_ExamUser/GetResult', this.formInline, function (response) {
                            mythis.result = response.data.pageData;
                        }, false);
                    } else {

                        //showMessage('请选择课程再进行查询！', 'error');
                        return;
                    }
                        
                },

                onSubmit: function () {
                    if (this.id == '999') {
                        showMessage('请选择课程再进行查询！', 'error');
                        return;
                    }

                    onSubmit(this);
                },
                onSubmit2: function () { this.kscx(); },

                handleSizeChange: function (val) { handleSizeChange(this, val); },
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },

                handleNodeClick: function (data) {
                    this.formInline.model.Category = data.id;
                    this.GetPageData(1);
                },
                tableHandleCurrentChange: function (currentRow, a) {
                    this.currSeelctId = currentRow.id;
                    this.currSeelctCell = currentRow;
                    this.formInline2.model.id = currentRow.id;
                    this.kscx();
                },
                kscx: function () {
                    var mythis = this;
                    if (mythis.formInline2.model.id == null) {
                        showMessage('请选择课程进行查询！', 'error');
                        return;
                    }
                    myAjax("post", mythis, '/api/PX_ExamUser/GetResult', this.formInline, function (response) {
                        mythis.result = response.data.pageData;
                    }, false);
                }
            }
        });
    </script>

</body>

</html>